<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/common.jspf"%>
<%@ include file="/common/taglibs.jspf"%>
<html lang="en">
  <head>		
  </head>
  <body>   
  <form id="theform" action="updateRole.json" method="post" class="form-horizontal">
  	<input type="hidden" name="userId" value="${tenant.id }" />
		<fieldset>
				<legend><s:message code="common.ui.fieldset.base" /></legend>	
					<div class="row-fluid">
						<div class="span6">
							<div class="control-group">
								<label class="control-label"><s:message code='tenant.tenantCode' /></label>
								<div class="controls">							
									<input type="text" name="loginId" value='<c:out value="${tenant.tenantCode }"/>' readonly="readonly" />
								</div>
							</div>
						</div>								
						<div class="span6">
							<div class="control-group">
								<label class="control-label"><s:message code='tenant.tenantAlias' /></label>
								<div class="controls">							
									<input type="text" name="userName" value='<c:out value="${tenant.tenantAlias }"/>' readonly="readonly" />
								</div>
							</div>
						</div>								
					</div>
		</fieldset>					
		<fieldset>
			<legend><s:message code="user.ui.fieldset.belongTo" /></legend>
			<table class="table table-striped table-bordered table-hover datatable">				
				<thead>
				  <tr>
					<th class="checkCol">序号</th>
					<th><s:message code="userInfo.loginId" /></th>
					<th><s:message code="userInfo.userName" /></th>
					<th><s:message code="userInfo.nickName" /></th>
					<th><s:message code="userInfo.gender" /></th>                        
					<th><s:message code="userInfo.status" /></th>
					<th><s:message code="common.field.createDatetime" /></th>
					<th><s:message code="common.field.updateDatetime" /></th>
				  </tr>	
				</thead>
				<tbody>
				  <c:forEach items="${tenantMemberList }" var="row" varStatus="status">
				    <tr>
				    	<td class="checkCol">${status.index+1 }</td>
				    	<td><a href="showMemberDetail.do?id=${row.tenantMember.id }"><c:out value="${row.userInfo.loginId }"></c:out>&nbsp;<i class="icon-info-sign"></i></a>
                            <p class="muted"><small><c:out value="${li:genDictContent('tenantMember-memberType', row.tenantMember.memberType) }"></c:out>
                              <c:if test="${not empty row.userInfo.job }">, <s:message code="userInfo.job"></s:message>:<c:out value="${row.userInfo.job }"></c:out></c:if>
                            </small></p>       
                        </td>
				    	<td><c:out value="${row.userInfo.userName }"></c:out></td>
						<td><c:out value="${row.userInfo.nickName }"></c:out></td>
						<td><c:out value="${li:genDictContent('0002', row.userInfo.gender) }"></c:out></td>
						<td><c:out value="${li:genDictContent('1002', row.userInfo.status) }"></c:out></td>
						<td><c:out value="${li:formatDateTime(row.userInfo.createDatetime) }"></c:out></td>
						<td><c:out value="${li:formatDateTime(row.userInfo.updateDatetime) }"></c:out></td>
				    </tr>
				  </c:forEach>
				</tbody>
			</table>
		</fieldset>
						
		<div class="form-actions" style="text-align: center;">			
			<button type="button" class="btn" onclick="history.back();"><s:message code="btn.back" /></button>
		</div>					
				
	</form>			
	<!--page specific plugin scripts-->				
		<script type="text/javascript">
		$(document).ready(function(){	
		  
		  var checkboxs = $.webtools.checkboxs({
				checkAll: "#checkAll",
				checkItem: ".checkItem"				
			});
			
			$('#theform').littFormSubmit({
				rules : {					
					roleIds : {
						required : true
					}
				},			
				success: function(reply){
					 location.href = <h:returnUrl value="index.do"></h:returnUrl>;					
				}
			});
		});
		</script>		  
  </body>	
</html>